﻿package org.puremvc.as3.multicore.utilities.unifiedloader.interfaces
{
	import flash.display.*;
	import flash.events.IEventDispatcher;
	
	/*
 	PureMVC UnifiedLoader Utility
 	Copyright (c) 2008 neil manuell
  	Your reuse is governed by the Creative Commons Attribution 3.0 License
 */
	public interface IAssetInfo  extends IEventDispatcher
	{
		/**
		 * Indicates whether the asset being held has loaded.
		 * @return 
		 * 
		 */
		function get status():String;

		
		/**
		 * the url of the asset
		 * @return 
		 * 
		 */
		function get url():String;
		/**
		 * 
		 * @private
		 * 
		 */
		function set url(param:String):void;
		
		 function deconstruct():void
		/**
		 * the priority for loading. This will be ignored, unless the queueSortFunction
		 * has been set on the Loader 
		 * @return 
		 * 
		 */
		function get priority():int;
		/**
		 * 
		 * @private
		 * 
		 */
		function set priority(param:int):void;
		
		/**
		 * idicates whether the asset is stored in the Loader's register 
		 * on a successfull load.  by default it is true;
		 * @param param
		 * 
		 */
		function set store(param:Boolean):void;
		/**
		 * The LoaderContext or SoundLoaderContext to be used for loading
		 * the asset. default is null. 
		 * @param param
		 * 
		 */
		function set context(param:Object):void;
		/**
		 * indicates the loaderClient to use.  The id should match the id it was registered with
		 * in the Loader's registerClient(id:String, c:Class) method
		 * @param param
		 * 
		 */
		function set clientType(param:String):void;
		
		/**
		 * this is basically the url's extention, built by spliting the url with a period 
		 * @return 
		 * 
		 */
		function get fileType():String;
		
		/**
		 * returns the loaded asset 
		 * @return 
		 * 
		 */
		function getAsset():*;
		
		/**
		 * this can be used on any Sprite, or a FlexModule to retrieve a new instance of a class.
		 * For a FlexModule do not pass the name parameter. 
		 * For a Sprite, the name parameter must equal that of the Class Definition Name 
		 * @param name
		 * @return 
		 * 
		 */
		function create(name:String = "", asClass:Boolean=false):*
		

	}
	
}